﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Richyp.Bodger.UI
{
    public partial class ForumsCodeForm : Form
    {
        MainWindow mainWindow;
        public ForumsCodeForm(MainWindow mainWindow)
        {
            this.mainWindow = mainWindow;
            InitializeComponent();
        }

        private void generateButton_Click(object sender, EventArgs e)
        {
            ForumsCodeOptions fco = new ForumsCodeOptions();
            fco.ShowDefaultWargear = this.showDefaultItems.Checked;
            fco.ShowFixedWargear = this.showFixedItems.Checked;
            fco.HideIndividualPointCosts = this.hideItemizedPoints.Checked;
            fco.UseNBSP = this.useNBSP.Checked;

            this.forumsCodeBox.Text = mainWindow.GenerateForumsCode(fco);
        }

        private void close_Click(object sender, EventArgs e)
        {
            this.Close();
        } 
    }

    public class ForumsCodeOptions
    {
        public bool ShowDefaultWargear = false;
        public bool ShowFixedWargear = false;
        public bool HideIndividualPointCosts = false;
        public bool UseNBSP = false;
    }
}
